package com.ta.util;

/**
 * 响应结果类
 * @param <E>指定数据参数
 */
public class JsonResult<E> {
    private Integer stata;
    private String message;
    private E data;

    public Integer getStata() {
        return stata;
    }

    public void setStata(Integer stata) {
        this.stata = stata;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public E getData() {
        return data;
    }

    public void setData(E data) {
        this.data = data;
    }

    public JsonResult(Integer stata, E data) {
        this.stata = stata;
        this.data = data;
    }

    public JsonResult(Integer stata) {
        this.stata = stata;
    }

    public JsonResult(Throwable message) {
        this.message = message.getMessage();
    }
}
